/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Vista.configuracion;

import Vista.Calibrar.Calibrar;
import Vista.Calibrar.CalibrateFrame;
import Vista.panel.ColorChooser;
import Vista.panel.FrmPrincipal;
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.Toolkit;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.nimbus.NimbusLookAndFeel;

/**
 *
 * @author Jhon Jairo
 */
public class MenuPal extends javax.swing.JFrame {

    public static FrmPrincipal frm = new FrmPrincipal();
    public static int thickness = 5;
    public static ColorChooser cl = new ColorChooser();
    public static NameVideo nm = new NameVideo();
    public static boolean state;
    public boolean isConcatenate;
    public boolean done = false;
    private Robot robot;

    /**
     * Creates new form MenuPal
     */
    public MenuPal() {
        this.setUndecorated(true);
        try {
            UIManager.setLookAndFeel(new NimbusLookAndFeel());
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(Settings.class.getName()).log(Level.SEVERE, null, ex);
        }
        initComponents();
        try {
            robot = new Robot();
        } catch (AWTException ex) {
            Logger.getLogger(Settings.class.getName()).log(Level.SEVERE, null, ex);
        }

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jSeparator5 = new javax.swing.JSeparator();
        panelRound1 = new org.edisoncor.gui.panel.PanelRound();
        jSeparator1 = new javax.swing.JSeparator();
        WhiteBoard = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        noWhiteBoard = new javax.swing.JLabel();
        color = new javax.swing.JLabel();
        jSeparator6 = new javax.swing.JSeparator();
        jlabelNew = new javax.swing.JLabel();
        jSeparator4 = new javax.swing.JSeparator();
        eraser = new javax.swing.JLabel();

        jSeparator5.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jSeparator1.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);

        WhiteBoard.setForeground(new java.awt.Color(255, 255, 255));
        WhiteBoard.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Images/Pizarra - copia.png"))); // NOI18N
        WhiteBoard.setText("Pizarra");
        WhiteBoard.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        WhiteBoard.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        WhiteBoard.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                WhiteBoardMousePressed(evt);
            }
        });

        jSeparator2.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);

        noWhiteBoard.setForeground(new java.awt.Color(255, 255, 255));
        noWhiteBoard.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Images/quitar - copia.png"))); // NOI18N
        noWhiteBoard.setText("Quitar pizarra");
        noWhiteBoard.setFocusable(false);
        noWhiteBoard.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        noWhiteBoard.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        noWhiteBoard.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                noWhiteBoardMousePressed(evt);
            }
        });

        color.setForeground(new java.awt.Color(255, 255, 255));
        color.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Images/colores - copia.png"))); // NOI18N
        color.setText("Colores");
        color.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        color.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        color.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                colorMousePressed(evt);
            }
        });

        jSeparator6.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator6.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jlabelNew.setForeground(new java.awt.Color(255, 255, 255));
        jlabelNew.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Images/nuevo - copia.png"))); // NOI18N
        jlabelNew.setText("Nuevo");
        jlabelNew.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jlabelNew.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jlabelNew.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                jlabelNewMousePressed(evt);
            }
        });

        jSeparator4.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL);

        eraser.setForeground(new java.awt.Color(255, 255, 255));
        eraser.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Images/borradorcp.png"))); // NOI18N
        eraser.setText("Borrador");
        eraser.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        eraser.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        eraser.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                eraserMousePressed(evt);
            }
        });

        javax.swing.GroupLayout panelRound1Layout = new javax.swing.GroupLayout(panelRound1);
        panelRound1.setLayout(panelRound1Layout);
        panelRound1Layout.setHorizontalGroup(
            panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound1Layout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addComponent(WhiteBoard)
                .addGap(18, 18, 18)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(noWhiteBoard)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 11, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(eraser, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 11, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(color)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jlabelNew, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(26, Short.MAX_VALUE))
        );
        panelRound1Layout.setVerticalGroup(
            panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(eraser, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jSeparator1)
                        .addComponent(WhiteBoard, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(noWhiteBoard, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(color)
                    .addComponent(jlabelNew, javax.swing.GroupLayout.Alignment.LEADING))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelRound1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelRound1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void WhiteBoardMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_WhiteBoardMousePressed
        frm.setSize((int) Toolkit.getDefaultToolkit().getScreenSize().getWidth(), (int) Toolkit.getDefaultToolkit().getScreenSize().getHeight());
        //opacityLabel.setVisible(true);
        //opacity.setVisible(true);
        //checkBrush.setSelected(true);
        frm.setVisible(true);
        //Calibrar.set.setVisible(true);
    }//GEN-LAST:event_WhiteBoardMousePressed

    private void noWhiteBoardMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_noWhiteBoardMousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_noWhiteBoardMousePressed

    private void eraserMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_eraserMousePressed
        if (frm.isVisible()) {
            frm.setVisible(false);
        }
    }//GEN-LAST:event_eraserMousePressed

    private void colorMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_colorMousePressed
        cl.setLocation(100, 0);
        cl.setResizable(false);
        cl.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        cl.setVisible(true);
    }//GEN-LAST:event_colorMousePressed

    private void jlabelNewMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jlabelNewMousePressed
        frm.repaint();
    }//GEN-LAST:event_jlabelNewMousePressed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel WhiteBoard;
    private javax.swing.JLabel color;
    private javax.swing.JLabel eraser;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JLabel jlabelNew;
    private javax.swing.JLabel noWhiteBoard;
    private org.edisoncor.gui.panel.PanelRound panelRound1;
    // End of variables declaration//GEN-END:variables
}
